package sis.studentinfo;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class ScorerTest {
	
	private Scorer scorer;
	
	@Before
	public void init() {
		this.scorer = new Scorer();
	}
	
	@Test
	public void testCaptureScore() {
		assertEquals(75, scorer.score("75"));
	}
	
	@Test(expected=NumberFormatException.class)
	public void testBadScoreEntered() {
		scorer.score("abc");
	}
	
	@Test
	public void testIsValid() {
		assertTrue(scorer.isValid("75"));
		assertFalse(scorer.isValid("abc"));
	}
	
	
}
